function [prob] = id3_test( data_attrib, child, attrib, split, root, label_prob, label_count)
    if (attrib(root) < 0) 
        prob = label_prob(root, :);
    else
        if (data_attrib(attrib(root)*2) < split(root))
            prob = id3_test(data_attrib, child, attrib, split, child(root, 1), label_prob, label_count);
        elseif (data_attrib(attrib(root)*2-1) > split(root))
            prob = id3_test(data_attrib, child, attrib, split, child(root, 2), label_prob, label_count);
        else
            prob = id3_test(data_attrib, child, attrib, split, child(root, 1), label_prob, label_count) * (split(root)-data_attrib(attrib(root)*2-1)) / (data_attrib(attrib(root)*2) -data_attrib(attrib(root)*2-1));
            prob = prob + id3_test(data_attrib, child, attrib, split, child(root, 2), label_prob, label_count)* (data_attrib(attrib(root)*2) - split(root)) / (data_attrib(attrib(root)*2) -data_attrib(attrib(root)*2-1));
        end
    end           
end

    